From: Andy Holmes Date: Sun, 12 Feb 2023 21:46:07 +0000 (-0800) Subject: environment: Define promisify of g_query_info_async in the global scope X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~405^2^2~15 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=3e3aa1f7a377264fe34c5d5ba8df9c8bea5a39bd;p=gnome-shell.git environment: Define promisify of g_query_info_async in the global scope This is something that will be used in other places outside the background code, so let's just define it globally without having to care about the importing order. Co-authored-by: Marco Trevisan (TreviƱo) Part-of: --- diff --git a/js/ui/background.js b/js/ui/background.js index 023b1823e..cd97c8946 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -101,8 +101,6 @@ const LoginManager = imports.misc.loginManager; const Main = imports.ui.main; const Params = imports.misc.params; -Gio._promisify(Gio.File.prototype, 'query_info_async'); - var DEFAULT_BACKGROUND_COLOR = Clutter.Color.from_pixel(0x2e3436ff); const BACKGROUND_SCHEMA = 'org.gnome.desktop.background'; diff --git a/js/ui/environment.js b/js/ui/environment.js index 5895031c6..c2088c394 100644 --- a/js/ui/environment.js +++ b/js/ui/environment.js @@ -55,6 +55,7 @@ Gio._promisify(Gio.DBusConnection.prototype, 'call'); Gio._promisify(Gio.DBusProxy, 'new'); Gio._promisify(Gio.DBusProxy.prototype, 'init_async'); Gio._promisify(Gio.DBusProxy.prototype, 'call_with_unix_fd_list'); +Gio._promisify(Gio.File.prototype, 'query_info_async'); Gio._promisify(Polkit.Permission, 'new'); let _localTimeZone = null;